[ACS] az aks create: Make --no-ssh-key default behaviour#32115
[ACS] az aks create: Make --no-ssh-key default behaviour#32115
az aks create: Make --no-ssh-key default behaviour#32115Conversation
Update template spec operations to extract and use the subscription ID from the resource ID if provided. Add tests to verify correct handling of subscription IDs in show, update, delete, and export commands for template specs.
Deleted test cases and YAML recordings related to template spec operations using a fake subscription ID. These tests were unnecessary as the functionality is already tested in other tests.
Removed redundant subscription_id variable assignments in template spec-related functions. Now, subscription_id is passed directly from parsed resource ID when template_spec is provided, improving code clarity and reducing duplication.
Introduces new test cases to validate update, show, delete and export operations for template specs using an auxiliary subscription.
Introduces the 'tags' argument to SQL server creation commands in _params.py. Adds a new test and recording to verify server creation with tags in test_sql_commands.py and corresponding YAML recording.
Added a new usage example to the SQL server create command help, demonstrating how to specify tags during server creation.
Refreshed test recording for SQL server creation with tags to reflect new API versions, updated timestamps, and changed response metadata. Ensures test compatibility with latest Azure CLI and service API updates.
Enhanced the logic for SSH key validation in AKS cluster creation to default to server-side generated keys if no local public key is found and no value is provided. Updated help documentation to clarify SSH key behavior. Added a test and recording for AKS creation without an SSH key.
️✔️AzureCLI-FullTest
|
Simplified the assignment of the SSH key path in validate_ssh_key by improving readability.
FumingZhang
left a comment
There was a problem hiding this comment.
Per discussion in the issue, this should be regarded as a breaking change, could you please follow the guidance to send out the notification first?
Refactored the SSH key validation in _validators.py to handle empty or invalid SSH key values more robustly and provide clearer error messages. Updated test recordings to reflect changes in AKS creation without an SSH key.
please also fix failed CI checks |
Simplified the validate_ssh_key function by removing an unnecessary else block before raising a CLIError for invalid SSH keys.
Adjusted the error message in validate_ssh_key to properly break lines for improved readability and consistency.
|
please fix the live test failure. |
Due to the breaking change, this PR will need to be merged in the following sprint. |
|
Please fix CI issues |
Thank you @yonzhan, I have fixed the linting errors |
|
No breaking change is allowed in a normal release. Please revert this PR. |
Related command
aks
Description
aks createcommand was run without any ssh related parameters, the command would failaks createcommand to operate under the pretense that --no-ssh-key was provided as a parameterTesting Guide
az aks createwith the required parameters and omitting all ssh related parametersThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.